package locators;

import org.openqa.selenium.firefox.FirefoxDriver;

public class LoginOnSalesforce {
    public static void main(String[] args) {
        FirefoxDriver driver = new FirefoxDriver();

        driver.get("https://login.salesforce.com");
        driver.findElementByXPath("//*[@id=\'username\']").sendKeys("username");
        driver.findElementByXPath("//*[@id=\'password\']").sendKeys("passwd");
        driver.findElementByXPath("//*[@id=\'Login\']").click();
//      receive error messages from site
        System.out.println(driver.findElementByXPath("//*[@id=\'error\']").getText());

    }
}
